// 字体的转换
@mixin font-dpr ($font-size) {
  font-size: $font-size;
  [data-dpr="2"] & {
    font-size: $font-size * 2;
  }
  [data-dpr="3"] & {
    font-size: $font-size * 3;
  }
}
// px转换为rem
@function px2rem ($px, $base-font-size: 64px) {
  @if unitless($px) {
    @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels for you";
    @return px2rem($px * 1px);
  } @else if unit($px) == rem {
    @return $px;
  }
  @return ($px / $base-font-size) * 1rem;
}

@function dycWidth($px){
  @return (100-$px)
}

@function rem($val){ @return $val/32+rem; }
//check rem(val)
@function checkRem($val){
  @if $val == auto{ @return auto; }
  @else if $val==0{ @return 0; }
  @else{ @return rem($val); }
}
//check px(val)
@function checkPx($val){ @if $val == auto{ @return auto; }@else if $val==0{ @return 0; }@else{ @return $val+px; } }
//需要加后缀
@mixin webkit($pro,$val){
  -webkit-#{$pro}:$val;
  #{$pro}:$val;
}
//@mixin radius(val)
@mixin radius($val){
  @include webkit(border-radius,checkRem($val));
}
//@mixin box(attr,t,r,b,l)
@mixin box($box,$t,$r:$t,$b:$t,$l:$r){
  //#{$box}: checkPx($t) checkPx($l) checkPx($b) checkPx($l);
  #{$box}:checkRem($t) checkRem($r) checkRem($b) checkRem($l);
}
//@mixin point(attr,val)
@mixin point($poi,$val){
  //#{$poi}:checkPx($val);
  #{$poi}:checkRem($val);
}
//@mixin icons
@mixin icons { display: block; font-family: 'icons';}

//@mixin 超出显示省略号
@mixin txtEllipsis {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
//colors
$blue:#3297fd;
$red:#f33;
$fff:#fff;
$fontBack:#060927;
